﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="AddClients.aspx.cs" Inherits="Client_Revenue.AddClients" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h4 style="text-decoration: underline; font-weight: bolder">
        New Client Info Entry</h4>
    <table style="border-style: solid; width: 100%; padding-left: 50; padding-right: 50;
        text-align: center;">
        <tr>
            <td colspan="4" />
        </tr>
         <tr>
            <td colspan="4">
                <asp:Label ID="lblError" runat="server"/>
            
                    <asp:ValidationSummary ID="valKeyword" DisplayMode= "BulletList" EnableClientScript="true" runat="server" style="color:Red; text-align:left;"/>
            </td>
        </tr>
        <tr>
            <td style="text-align: left; width: 100;">
                <asp:Label runat="server" ID="lblrequired" Text="*" style="color:Red; text-align:left;"></asp:Label>
                <asp:Label ID="Label1" runat="server" Text="Client Name" />
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtClientName" runat="server" Width="213px" />
                <asp:RequiredFieldValidator Display="None" ID="reqClientName" ControlToValidate="txtClientName" ErrorMessage="Please enter the client name"  runat="server" style="color:Red; text-align:left;" Text="*"
                    EnableClientScript="True"/>
            </td>
            <td style="text-align: left; width: 100;">
                <asp:Label ID="Label2" runat="server" Text="Client Type" />
                <asp:DropDownList ID="ddlClientType" runat="server" DataTextField="ClientTypeName"
                    DataValueField="ClientTypeId">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <h4 style="text-align: left; text-decoration: underline; font-weight: bold">
                    Client Address</h4>
            </td>
            <td valign="bottom">
                <table>
                    <tr>
                        <td>
                            <h4 style="text-align: left; text-decoration: underline; font-weight: bold; vertical-align: bottom;">
                                Contact Person</h4>
                        </td>
                        <td valign="bottom" style="text-align: left;">
                            <asp:CheckBox ID="chkSameAddress" runat="server" Text="Same Address" OnCheckedChanged="ckSameAddress_CheckedChanged"
                                AutoPostBack="True" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2" valign="top">
                <asp:Panel ID="pnClientAddress" runat="server">
                    <table>
                        <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label runat="server" ID="Label23" Text="*" style="color:Red; text-align:left;"></asp:Label>
                                <asp:Label ID="Label4" runat="server" Text="Address Line #1" />
                            </td>
                            <td style="text-align: left" class="style5">
                                <asp:TextBox ID="txtLine1" runat="server" Width="213px" />
                                <asp:RequiredFieldValidator Display="None" ID="RequiredFieldValidator1" ControlToValidate="txtLine1" ErrorMessage="Please enter the address"  runat="server"
                     EnableClientScript="True" style="color:Red; text-align:left;"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label ID="Label5" runat="server" Text="Address Line #2" />
                            </td>
                            <td style="text-align: left;" class="style5">
                                <asp:TextBox ID="txtLine2" runat="server" Width="213px" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label ID="Label6" runat="server" Text="Address Line #3" />
                            </td>
                            <td style="text-align: left;" class="style5">
                                <asp:TextBox ID="txtLine3" runat="server" Width="213px" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label runat="server" ID="Label24" Text="*" style="color:Red; text-align:left;"></asp:Label>
                                <asp:Label ID="Label7" runat="server" Text="City" />
                            </td>
                            <td style="text-align: left;" class="style5">
                                <asp:TextBox ID="txtCity" runat="server" Width="213px" />
                                <asp:RequiredFieldValidator Display="None" ID="RequiredFieldValidator2" ControlToValidate="txtCity" ErrorMessage="Please enter the city"  runat="server"
                     EnableClientScript="True" style="color:Red; text-align:left;" Text="*"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label runat="server" ID="Label25" Text="*" style="color:Red; text-align:left;"></asp:Label>
                                <asp:Label ID="Label8" runat="server" Text="State" />
                            </td>
                            <td style="text-align: left;" class="style5">
                                <asp:TextBox ID="txtState" runat="server" Width="100px" />
                                <asp:RequiredFieldValidator Display="None" ID="RequiredFieldValidator3" ControlToValidate="txtState" ErrorMessage="Please enter the state"  runat="server"
                     EnableClientScript="True" style="color:Red; text-align:left;" Text="*"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label runat="server" ID="Label26" Text="*" style="color:Red; text-align:left;"></asp:Label>
                                <asp:Label ID="Label10" runat="server" Text="Postal Code/Zip" />
                                
                            </td>
                            <td style="text-align: left;" class="style5">
                                <asp:TextBox ID="txtZip" runat="server" Width="100px" />
                                <asp:RequiredFieldValidator Display="None" ID="RequiredFieldValidator4" ControlToValidate="txtZip" ErrorMessage="Please enter the zip"  runat="server"
                     EnableClientScript="True" style="color:Red; text-align:left;" Text="*"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label ID="Label11" runat="server" Text="Client URL" />
                            </td>
                            <td style="text-align: left;" class="style5">
                                <asp:TextBox ID="txtURL" runat="server" Width="100px" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
            <td valign="top">
                <asp:Panel ID="pnContactPerson" runat="server">
                    <table>
                    <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label ID="Label22" runat="server" Text="Title" />
                            </td>
                            <td style="text-align: left;" class="style4">
                                <asp:TextBox ID="txtTitle" runat="server" Width="100px" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                            <asp:Label runat="server" ID="Label27" Text="*" style="color:Red; text-align:left;"></asp:Label>
                                <asp:Label ID="Label12" runat="server" Text="FirstName" />
                            </td>
                            <td style="text-align: left;" class="style4">
                                <asp:TextBox ID="txtFirstName" runat="server" Width="100px" />
                                 <asp:RequiredFieldValidator Display="None" ID="ReqFirstName" ControlToValidate="txtFirstName" ErrorMessage="Please enter the contact first name"  runat="server"
                     EnableClientScript="True" style="color:Red; text-align:left;" Text="*"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 50;">
                            <asp:Label runat="server" ID="Label28" Text="*" style="color:Red; text-align:left;"></asp:Label>
                                <asp:Label ID="Label13" runat="server" Text="MidName" />
                               
                            </td>
                            <td style="text-align: left;" class="style4">
                                <asp:TextBox ID="txtMid" runat="server" Width="100px" />
                                 <asp:RequiredFieldValidator Display="None" ID="reqMidName" ControlToValidate="txtMid" ErrorMessage="Please enter the contact middle name"  runat="server"
                     EnableClientScript="True" style="color:Red; text-align:left;" Text="*"/>
                                
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                            <asp:Label runat="server" ID="Label29" Text="*" style="color:Red; text-align:left;"></asp:Label>
                                <asp:Label ID="Label14" runat="server" Text="LastName" />
                            </td>
                            <td style="text-align: left;" class="style4">
                                <asp:TextBox ID="txtLastName" runat="server" Width="100px" />
                                <asp:RequiredFieldValidator Display="None" ID="reqLastName" ControlToValidate="txtLastName" ErrorMessage="Please enter the contact last name"  runat="server"
                     EnableClientScript="True" style="color:Red; text-align:left;" Text="*"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left;" class="style2">
                                <asp:Label ID="Label15" runat="server" Text="Work-Phone" />
                            </td>
                            <td style="text-align: left;" class="style3">
                                <asp:TextBox ID="txtWorkPhone" runat="server" Width="100px" />
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtWorkPhone"
                                    ErrorMessage="Enter valid phone e.g (123) 456 7890 " ForeColor="Red" SetFocusOnError="True"
                                    ValidationExpression="^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$" ValidationGroup="Phones"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label ID="Label16" runat="server" Text="Mobile-Phone" />
                            </td>
                            <td style="text-align: left;" class="style4">
                                <asp:TextBox ID="txtMobile" runat="server" Width="100px" />
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtMobile"
                                    ErrorMessage="Enter valid phone e.g (123) 456 7890 " ForeColor="Red" SetFocusOnError="True"
                                    ValidationExpression="^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$" ValidationGroup="Phones"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label ID="Label17" runat="server" Text="email-address" />
                            </td>
                            <td style="text-align: left;" class="style4">
                                <asp:TextBox ID="txtEmail" runat="server" Width="100px" />
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtEmail"
                                    ErrorMessage="Enter valid email e.g.. Joe.Cool@dominiumbenefits.com" ForeColor="Red"
                                    SetFocusOnError="True" ValidationExpression="^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$"
                                    ValidationGroup="emails"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left;" colspan="2">
                                <asp:CheckBox ID="chkIsPrimary" runat="server" Text="Is Primary Contact?" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left;" colspan="2">
                                <asp:CheckBox ID="chkSend" runat="server" Text="Send Card?" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
            <td valign="top">
                <asp:Panel ID="pnContactAddres" runat="server" Visible="false">
                    <table>
                        <tr>
                            <td style="text-align: left; width: 100;">
                            <asp:Label runat="server" ID="Label30" Text="*" style="color:Red; text-align:left;"></asp:Label>
                                <asp:Label ID="Label3" runat="server" Text="Address Line #1" />
                              
                            </td>
                            <td style="text-align: left" class="style6">
                                <asp:TextBox ID="txtContactAddress1" runat="server" Width="213px" />
                                 <asp:RequiredFieldValidator Display="None" ID="RequiredFieldValidator5" ControlToValidate="txtContactAddress1" ErrorMessage="Please enter the contact address"  runat="server"
                     EnableClientScript="True" style="color:Red; text-align:left;" Text="*"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label ID="Label9" runat="server" Text="Address Line #2" />
                            </td>
                            <td style="text-align: left;" class="style6">
                                <asp:TextBox ID="txtContactAddress2" runat="server" Width="213px" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                                <asp:Label ID="Label18" runat="server" Text="Address Line #3" />
                            </td>
                            <td style="text-align: left;" class="style6">
                                <asp:TextBox ID="txtContactAddress3" runat="server" Width="213px" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                            <asp:Label runat="server" ID="Label31" Text="*" style="color:Red; text-align:left;"></asp:Label>
                                <asp:Label ID="Label19" runat="server" Text="City" />
                            </td>
                            <td style="text-align: left;" class="style6">
                                <asp:TextBox ID="txtContactCity" runat="server" Width="213px" />
                                                             <asp:RequiredFieldValidator Display="None" ID="RequiredFieldValidator6" ControlToValidate="txtContactCity" ErrorMessage="Please enter the contact city"  runat="server"
                     EnableClientScript="True" style="color:Red; text-align:left;" Text="*"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                            <asp:Label runat="server" ID="Label32" Text="*" style="color:Red; text-align:left;"></asp:Label>
                                <asp:Label ID="Label20" runat="server" Text="State" />
                            </td>
                            <td style="text-align: left;" class="style6">
                                <asp:TextBox ID="txtContactState" runat="server" Width="100px" />
                                                             <asp:RequiredFieldValidator Display="None" ID="RequiredFieldValidator7" ControlToValidate="txtContactState" ErrorMessage="Please enter the contact state"  runat="server"
                     EnableClientScript="True" style="color:Red; text-align:left;" Text="*"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; width: 100;">
                            <asp:Label runat="server" ID="Label33" Text="*" style="color:Red; text-align:left;"></asp:Label>
                                <asp:Label ID="Label21" runat="server" Text="Postal Code/Zip" />
                            </td>
                            <td style="text-align: left;" class="style6">
                                <asp:TextBox ID="txtContactZip" runat="server" Width="100px" />
                                                             <asp:RequiredFieldValidator Display="None" ID="RequiredFieldValidator8" ControlToValidate="txtContactZip" ErrorMessage="Please enter the contact zip"  runat="server"
                     EnableClientScript="True" style="color:Red; text-align:left;" Text="*"/>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td style="text-align: center;" colspan="2">
                <asp:Button runat="server" ID="btAddClient" Text="Save" Width="108px" OnClick="btAddClient_Click" />&nbsp;&nbsp;&nbsp;
                <asp:Button runat="server" ID="btnCancel" Text="Cancel" Width="108px" 
                    onclick="btnCancel_Click" CausesValidation="False"/>
            </td>
        </tr>
    </table>
</asp:Content>
